Get public IP address of a network/computer.
#include <INet.au3>
_GetIP ( )
Parameters
None
Return Value
Success: | Returns the public IP Address |
Failure: | Returns -1 and sets @ERROR = 1 |
Remarks
This only returns the Public IP address of a computer or network (i.e. the public IP on the WAN link of your NAT router). The address is determined by accessing an external IP discovery web site like checkip.dyndns.org or www.whatismyip.com.
Related
None.
Example
#include <Inet.au3>
$PublicIP = _GetIP()
MsgBox(0, "IP Address", "Your IP Address is: " & $PublicIP)